
        $("#submi").click(function(){
           IC.talkingDataCount("培训考试","00010");
          //点击按钮之前 先判断当前页面的提交状态
              submitPaper(); 
        })
        function submitPaper(){
            IC.talkingDataCount("培训考试","00010");
            //alert("准备交卷");
            //发起一个ajax请求
            //获取后台 记录的用户选项:
            var userSlec=appcan.locStorage.getVal("userSlec");
            var dataLIst=JSON.parse(appcan.locStorage.getVal("dataLIst"));
            var userSlec=appcan.locStorage.getVal("userSlec");
            var examId=appcan.locStorage.getVal("examId");
            var userId=appcan.locStorage.getVal("userId");
            var subjectItemId;
            var paperId=appcan.locStorage.getVal("paperId");
            // (userSlec !="" || userSlec != null)?subjectItemId=userSlec:subjectItemId=appcan.locStorage.getVal("subjectItemId");
            subjectItemId=(userSlec !="" || userSlec != null)?userSlec:appcan.locStorage.getVal("subjectItemId");
            var subjectId=appcan.locStorage.getVal("subjectId");   
            //var url="http://172.31.64.34:8011/sdk10098/public/queryUserExams/submitPaper?"
            // var url="http://store.ceair.com/mas/sdk10098/public/yddfMAS/submitPaper?";
            var url=h_yddfUrl+"yddfMAS/submitPaper?";

            if(!subjectItemId){
               var data={"userId":userId,"examId":examId,"paperId":paperId,"subjectId":subjectId,"subjectItemId":""};
             }else{
               var data={"userId":userId,"examId":examId,"paperId":paperId,"subjectId":subjectId,"subjectItemId":subjectItemId};
             }
            $.ajax({
               url:url,
               data:data,
               type:"get",
               dataType:"json",
               success:function(data){
                  clearInterval(timer);
                    appcan.locStorage.setVal("submit","submit");
                    var datas=eval("("+data.return+")");
                    //console.log(datas);
                    if(datas.status==0){
                        var daiban=appcan.locStorage.getVal("daiban");
                        if(daiban=="1"){
                              // uexWindow.evaluateScript({
                              //       name:"kaosDemo", 
                              //       type:0, 
                              //       js:"appcan.window.close(-1)",
                              // });
                              uexWindow.evaluateScript("fenshu", "0", "appcan.window.close(-1)");
                              appcan.window.close(-1);
                        }else{
                          //将提交过得结果 保存到本地
                              appcan.locStorage.setVal("score",datas.score);
                              var top1=$('#header').offset().height;
                              var top2=$(".time_title").offset().height;
                              var titHeight = top2+top1;
                              appcan.frame.open("userScore_content", "userScore_content.html",0, titHeight);
                               if(dataLIst !==null){
                                      delete dataLIst[examId];//删除当前这个属性;
                                      appcan.locStorage.setVal("dataLIst",JSON.stringify(dataLIst));
                                  }
                                appcan.locStorage.setVal("c",1);
                        }
                    }

               },
               error:function(){
                   appcan.window.alert("提示","请求超时,请稍后重试","确定");
               }
           })  

        } 

        
        



